package cn.qayy.service;


import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.web.bind.annotation.RequestParam;

import com.github.pagehelper.PageInfo;

import cn.qayy.dto.StandardDTO;
import cn.qayy.po.Policy;
import cn.qayy.po.Standard;

/**
 * @author wangyu
 * 标准测算价接口
 */
public interface IStandardService extends BasicService{
	/**
	 * 分页查询
	 * @param params
	 * @return
	 */
    PageInfo<Standard> selectStandardBy(Map<String, Object> params) throws Exception;

    List<StandardDTO> selectStandardForDown(@RequestParam Map<String, Object> params) throws Exception;
    /***
     * 通过id查询
     * @param standardId
     * @return
     */
    Standard selectStandardByID(@RequestParam Integer standardId) throws Exception;

    /**
     * 查询标测测算价，各个字段拼接的key,用于去重复项判断
     * @return
     */
	List<? extends String> selectPbKeys() throws Exception;
	
	/***
	 * 根据当前录入的协议，获取对应的标准测算价
	 * @param policy
	 * @return
	 */
	Standard getStandard(Map<String,Object> params) throws Exception;

	List<Standard> selectByMap(Map<String, Object> params);
	/***
	 * 查询id
	 * @param params
	 * @return
	 */
	List<Integer> selectIdsByMap(Map<String, Object> params);
	
	/**
	 * 持久化
	 * @param map
	 * @param request
	 * @param response
	 * @throws Exception 
	 */
	void persistence(Map<String, List<Uploadable>> map, HttpServletRequest request, HttpServletResponse response) throws Exception;
}
